import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.MouseEvent;


public class Virtualization {
	
	private Robot robot;
	
	public Virtualization() {
		
		//initialize robot
		try {
			robot = new Robot();
		}
		catch(AWTException ex) {
			System.out.println(ex.getMessage());
			System.exit(-1);
		}
	}
	
	//according to given grid information clicks the grid
	public void clickGrid(Grid grid) {
		robot.mouseMove(grid.getX(), grid.getY());
		robot.mouseRelease(MouseEvent.BUTTON1);
	}
}
